/**
 * Copyright 2011 Alex Vikulov (vikuloff@gmail.com)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */

package com.vvip.stockhart.point;


public class StockPoint extends CustomPoint
{
	public StockPoint(Object id)
	{
		super(id,4);
	}
	
	public StockPoint(Object id, double open,double close,double high, double low)
	{
		super(id,new double[] { open, close, high, low});
	}
	
	public double[] getMaxMin()
	{
		return new double[] { getHigh(), getLow() }; 
	}
	
	public void setOpen(double value)
	{
		this.Values[0] = value;
	}
	
	public void setClose(double value)
	{
		this.Values[1] = value;
	}
	
	public void setHigh(double value)	
	{
		this.Values[2] = value;
	}	
	
	public void setLow(double value)	
	{
		this.Values[3] = value;
	}
		
	public double getOpen(double value)
	{
		return this.Values[0];
	}
	
	public double getClose()
	{
		return this.Values[1];
	}
	
	public double getHigh()	
	{
		return this.Values[2];
	}	
	
	public double getLow()	
	{
		return this.Values[3];
	}
		
}
